<%@ page contentType="text/html;charset=utf-8" language="java" %>
<%@ page pageEncoding="utf-8"%>
<%request.setCharacterEncoding("utf-8");%>
<%@ include file="/include/filepath.jsp"%>
<%@ include file="/include/pageexpires.jsp" %>
<%@include file="/include/currentuserinfo.jsp"%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     <link rel="STYLESHEET" type="text/css" href="<%=ctxpath%>/dhtmlxTree/css/dhtmlXTree.css">
    <script  src="<%=ctxpath%>/dhtmlxTree/javascript/dhtmlXCommon.js"></script>
    <script  src="<%=ctxpath%>/dhtmlxTree/javascript/dhtmlXTree.js"></script>	
   
    <script type="text/javascript" src="<%=ctxpath%>/chat/js/dtree.js"></script>
    <link rel="StyleSheet" href="<%=ctxpath%>/chat/css/dtree.css" type="text/css" />
    <link type="text/css" rel="stylesheet" href="<%=ctxpath%>/themes/newstyle/styles/mac/macmenu.css" id="menuStyleSheet">
    <title>联合易讯</title>
  </head>
  <script language="javascript">
function opend(senduserid){
form1.target="frm123";
form1.action='<%=ctxpath%>/chat/message.do?method=search&flag=2&senduserid='+senduserid;
form1.submit();
}
function opendSearch(){
form1.target="frm123";
form1.action='<%=ctxpath%>/chat/message/search.jsp';
form1.submit();
}
function logicmessage(id){
 if (id.indexOf("00000001") >= 0){
 opendSearch();
 }else if(id.indexOf("org") < 0){
 opend(id);
 }
}
  </script>
  <body>
    <%
    String id = request.getParameter("id");
    if(id== null || id.equals("")){
      id="";
    }
    %>
    <form name="form1"  action="/chat/message.do" method="post" >
      <table class="labeltable_middle_table" width="100%" height="100%">
        <tr>
          <td width="25%" height="100%" valign="top">
              <a href="#" onclick="opendSearch()">模糊查询</a>
              <br>
              <br>
            <div id="treeboxbox_tree" style="OVERFLOW-Y: scroll;overflow:auto;width:100%;height=100%;scrollbar-face-color:#ffffff;scrollbar-shadow-color:#C1C1BB;scrollbar-highlight-color:#C1C1BB;scrollbar-3dlight-color:#EBEBE4;scrollbar-darkshadow-color:#EBEBE4;scrollbar-track-color:#F4F4F0;scrollbar-arrow-color:#000000"></div>
            <!--  <div id="treeboxbox_tree" style="width:100%;height:100%"></div>-->
            <script>
			tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%","<%=id%>");
			tree.setImagePath("<%=ctxpath%>/chat/img/");
                        tree.setOnClickHandler(logicmessage);
                        tree.setXMLAutoLoading("<%=ctxpath%>/tree/DhtmlxTree/orgmodle.do?method=getChatUser");
                        tree.loadXML("<%=ctxpath%>/tree/DhtmlxTree/orgmodle.do?method=getChatUser&id=<%=id%>");
            </script> 
            
          </td>
          <td width="75%" height="100%">
            <iframe id="frm123" name="frm123" src="<%=ctxpath%>/chat/message/search.jsp" width="100%" height="100%" frameborder="0" scrolling="auto"></iframe>
          </td>
        </tr>
      </table>
    </form>
  </body>
</html>

